package tech.summerly.weather.component.view

import android.content.Context
import android.preference.EditTextPreference
import android.util.AttributeSet

class MyEditTextPreference
    : EditTextPreference {

    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context?) : super(context)

    private var mSummary: String = super.getSummary().toString()

    override fun getSummary(): CharSequence {
        return mSummary.format(text)
    }
}